#app {

  .main-container {
    min-height: 100%;
    transition: margin-left 0.2s;
    margin-left: $sideBarWidth;
    position: relative;
    background-color: #F8F8FB;
  }

  .sidebar-container {
    transition: width 0.2s;
    width: $sideBarWidth !important;
    background-color: $menuBg;
    height: 100%;
    position: fixed;
    font-size: 0;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1001;
    overflow: hidden;
   
    // reset element-ui css
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    }

    .scrollbar-wrapper {
      overflow-x: hidden !important;
    }

    .el-scrollbar__bar.is-vertical {
      width: 4px;
      right: 0;
    }

    .el-scrollbar {
      height: 100%;
    }

    &.has-logo {
      .el-scrollbar {
        height: calc(100% - 70px);
      }
    }

    @media (max-width: 1600px) {
      &.has-logo {
        .el-scrollbar {
          height: calc(100% - 64px);
        }
      }
    }

    @media (max-width: 1440px) {
      &.has-logo {
        .el-scrollbar {
          height: calc(100% - 56px);
        }
      }
    }

    .is-horizontal {
      display: none;
    }

    a {
      display: block;
      width: 100%;
      overflow: hidden;
    }

    .svg-icon {
      margin-right: 16px;
    }

    .el-menu {
      border: none;
      ::v-deep .menu-wrapper {
        .nest-menu {
          .el-menu-item {
            padding: 0 20px 0 52px !important;
            font-size: 13px;
            height: 31px;
            line-height: 31px;
            color:$menuItemFontColor !important;
            &.is-active {
              color:$white !important;
            }
          }
          @media (max-width: 1440px) {
            .el-menu-item {
              padding: 0 16px 0 42px !important;
            }
          }
        }
      }
    }

    .el-submenu__title i {
      color:#A6B0CF !important;
    }
    .is-active>span,
    .is-active .el-submenu__title i {
      color:#fff !important;
    }

    // menu hover
    .submenu-title-noDropdown,
      ::v-deep .el-submenu__title {
      padding: 0 24px !important;
      font-size: 13px;
      color: #A6B0CF !important;
      height: 45px;
      line-height: 45px;
      &:hover {
        background-color: $menuHover !important;
      }
      ::v-deep .el-submenu__title i {
        color: #A6B0CF !important;
      }
      .menu-icon {
        font-size: 13px !important;
        color: #A6B0CF !important;
        margin-right: 10px !important;
      }
    }

    .is-active .menu-icon {
      color: #fff !important;
    }
    .is-active>.el-submenu__title {
      color: $subMenuActiveText !important;
    }

    & .nest-menu .el-submenu>.el-submenu__title,
    & .el-submenu .el-menu-item {
      min-width: $sideBarWidth !important;
      background-color: #2A3042 !important;
      &:hover {
        background-color: #2e3548 !important;
      }
    }
    .el-scrollbar__view {
      padding: 10px 0 30px 0;
    }
  }
  .hideSidebar .el-menu--collapse .menu-icon {
    font-size: 16px !important;
    color: #A6B0CF !important;
    margin-right: 0 !important;
  }

  .hideSidebar .el-menu--collapse .is-active .menu-icon {
    color: #fff !important;
  }

  @media (max-width: 1600px) {
    .sidebar-container,
    .sidebar-container .el-submenu .el-menu-item {
      width: 200px !important;
    }
    .sidebar-container .el-submenu .el-menu-item {
      min-width: 1px !important;
    }
    .main-container {
      transition: margin-left 0.2s;
      margin-left: 200px;
    }
  }

  @media (max-width: 1440px) {
    .sidebar-container,
    .sidebar-container .el-submenu .el-menu-item {
      width: 184px !important;
    }
    .sidebar-container .submenu-title-noDropdown,
    .sidebar-container ::v-deep .el-submenu__title {
      padding: 0 16px !important;
    }
    .main-container {
      transition: margin-left 0.2s;
      margin-left: 184px;
    }
  }

  .hideSidebar {
    .sidebar-container {
      width: 70px !important;
    }

    @media (max-width: 1360px) {
      .sidebar-container {
        width: 56px !important;
      }
    }

    .main-container {
      margin-left: 70px;
    }

    @media (max-width: 1360px) {
      .main-container {
        margin-left: 56px;
      }
    }

    .submenu-title-noDropdown {
      padding: 0 !important;
      position: relative;

      .el-tooltip {
        padding: 0 !important;
        text-align: center;
        .svg-icon {
          margin-left: 20px;
        }
      }
    }

    .el-submenu {
      overflow: hidden;
      &>.el-submenu__title {
        padding: 0 !important;
        text-align: center;
        .svg-icon {
          margin-left: 20px;
        }

        .el-submenu__icon-arrow {
          display: none;
        }
      }
      
    }

    .el-submenu:hover {
      &>.el-submenu__title {
        background: #2e3548 !important;
      }
    }
    .el-menu-item:hover {
      background: #2e3548 !important;
    }

    .el-menu--collapse {
      .menu-icon{
        margin-right: 0;
        font-size: 18px;
      }
      .el-submenu {
        &>.el-submenu__title {
          &>span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
        }
      }
    }
  }

  .el-menu--collapse .el-menu .el-submenu {
    min-width: $sideBarWidth !important;
  }

  // mobile responsive
  .mobile {
    .main-container {
      margin-left: 0;
    }

    .sidebar-container {
      transition: transform .28s;
      width: $sideBarWidth !important;
    }

    &.hideSidebar {
      .sidebar-container {
        pointer-events: none;
        transition-duration: 0.3s;
        transform: translate3d(-$sideBarWidth, 0, 0);
      }
    }
  }

  .withoutAnimation {

    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
  .hideSidebar .sidebar-container ::v-deep .el-submenu__title {
    height: 48px;
    line-height: 48px;
  }
}

// when menu collapsed
.el-menu--vertical {
  &>.el-menu {
    .svg-icon {
      margin-right: 16px;
    }
  }

  .nest-menu .el-submenu>.el-submenu__title,
  .el-menu-item {
    &:hover {
      // you can use $subMenuHover
      background-color: $menuHover !important;
    }
  }

  // the scroll bar appears when the subMenu is too long
  >.el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;

    &::-webkit-scrollbar-track-piece {
      background: #d3dce6;
    }

    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-thumb {
      background: #99a9bf;
      border-radius: 20px;
    }
  }  
}

.nest-menu .el-menu-item {
  padding: 0 16px !important;
  font-size: 13px;
  color: #79829C !important;
  height: 48px;
  line-height: 47px;
}
.nest-menu .el-menu-item.is-active {
  color: #ffffff !important;
}
.nest-menu .el-menu-item:hover {
  color: #ffffff !important;
  background: #2e3548 !important;
}
